def findMinAndMax(L):
    max = L[0]
    min = L[0]
    for i in L:
        if i>max:
            max = i
        if i<min:
            min = i
    return (max,min) 

print(findMinAndMax([1,2,3,4,5,6]))